<template>
  <div class="aside" ref="aside_left">
      <ul>
          <li @click="jump('map')">游戏资料</li>
          <li @click="jump('weapon/shouye')">武器</li>
      </ul>
  </div>
</template>

<script>
export default {
    props:['show'],
    data(){
        return{
            onshow:this.show
        }
    },
    methods:{
        changeShow(){
            this.onshow=!this.onshow;
            // console.log(this.onshow)
        },
        jump(url){
            this.$router.push('/'+url)
        }
    },
    watch:{
        onshow:function(val){
            // console.log(val)
            if(val){
                this.$refs.aside_left.style='left:-3%'
            }
            else{
                this.$refs.aside_left.style='left:-50%'
            }
        }
    }
}
</script>

<style lang="scss" scoped>
@import'../assets/asideBar/asideBar.scss';
</style>>
